package com.team.easybuy.mapper;

import com.team.easybuy.entity.Order;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

@Mapper
public interface OrderMapper {
    List<Order> selectOrderList(@Param("userId") Integer userId, @Param("isPay") Integer isPay,@Param("refund") Integer refund);

    int updateIsDelete(Integer id);

    int updateIsPay(@Param("id") Integer id, @Param("isPay") Integer isPay);

    int addOrder(Order order);

    Order loadOrder(Integer id);

    int updatePayType(String out_trade_no);

    List<Order> selectAll();

    void updatePayTypeIfNoPay(Integer id);

    void refund(Integer id);

    boolean updateRefund(Integer id);
}
